<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>资源附件</title>
        <link rel="stylesheet" href="../css/resource-filelist.css"/>
        <link rel="stylesheet" href="../css/fenye.css">
        <script type="text/javascript" src="../js/jquery.js"></script>
        <script type="text/javascript" src="../js/space-resource-left.js"></script>
    </head>

<body>
<!--**************顶部导航****************-->
<%@include file="../jsp/common/nav.jsp"%>
<!--**************左侧导航****************-->
<%@include file="../jsp/common/sidebar-scroll.jsp"%>
<!--***************右侧资源附件界面*******************-->
<div class="right">
    <!--标题导航-->
    <div class="resource-nav">
        <span class="resource-nav-title"><a href="/index/main">学习空间</a></span>
        >
        <span class="resource-nav-title"><a href="/index/space-main?space_id=${space.id}&name=${space.name}">${space.name}</a></span>
        >
        <span class="resource-nav-title"><a href="/resource/space-resource">资源区</a></span>
        >
        <span>附件列表</span>
    </div>
    <!--资源区头部-->
    <div class="resource-top">
        <div class="top-left">
            附件列表
        </div>
        <div class="top-right">
            <span class="span1"><a href="/resource/space-resource">返回资源目录</a></span>
            <span><a href="/resource/space-resource-search">查找资源</a></span>
        </div>
    </div>
    <div class="resource-content">
        <div class="content-top">
                <span class="resource-name">附件名</span>
                <span class="size">附件大小</span>
                <span class="writer">上传者</span>
                <span class="detail">所属资源</span>
                <span class="count">下载次数</span>
                <span class="caozuo">操作</span>
        </div>
        <c:forEach items="${flist}" var="list">
        <div class="resource-list">
            <ul>
                <li>
                    <div class="list">
                            <span class="resource-name">${list.filename}</span>
                            <span class="size">${list.filesize}</span>
                            <span class="writer">${list.resources.author}</span>
                            <span class="detail">
                                <a href="/resource/space-resource-show?id=${list.resources.id}&space_id=${space.id}">${list.resources.title}</a>
                            </span>
                            <span class="count">${list.downloadcount}</span>
                            <span class="caozuo">
                                <a href="/resource/deletefilelist?id=${list.id}">删除</a>
                                <a href="/resource/download?id=${list.id}&filename=${list.filename}&downloadcount=${list.downloadcount}">下载</a>
                            </span>
                    </div>
                </li>
            </ul>
        </div>
        </c:forEach>
    </div>
    <!--***************分页****************-->
    <div class="page">
        <ul>
            <li class="page_li">
                <a class="page_btn"id="prePage" href="/resource/space-resource-filelist?page=${currentPage-1}">
                    <
                </a>
            </li>
            <li class="page_li">
                <a class="page_btn" id="page_btn1" href="/resource/space-resource-filelist?page=1">
                    1
                </a>
            </li>
            <li class="page_li"> <span class="pages_span" id="prePoint">...</span> </li>
            <li class="page_li">
                <a class="page_btn" id="page_btn2" href="/resource/space-resource?page=${currentPage-2}">
                    ${currentPage-2}
                </a>
            </li>
            <li class="page_li">
                <a class="page_btn" id="page_btn3" href="/resource/space-resource?page=${currentPage-1}">
                    ${currentPage-1}
                </a>
            </li>
            <li class="page_li">
                <a class="page_btn" id="page_btn4" href="/resource/space-resource-filelist?page=${currentPage}">
                    ${currentPage}
                </a>
            </li>
            <li class="page_li">
                <a class="page_btn" id="page_btn5" href="/resource/space-resource-filelist?page=${currentPage+1}">
                    ${currentPage+1}
                </a>
            </li>
            <li class="page_li">
                <a class="page_btn" id="page_btn6" href="/resource/space-resource-filelist?page=${currentPage+2}">
                    ${currentPage+2}
                </a>
            </li>
            <li class="page_li"> <span class="pages_span" id="sufPoint">...</span> </li>
            <li class="page_li">
                <a class="page_btn" id="page_btn7" href="/resource/space-resource-filelist?page=${all}">
                    ${all}
                </a>
            </li>
            <li class="page_li">
                <a class="page_btn" id="sufPage" href="/resource/space-resource-filelist?page=${currentPage+1}">
                    >
                </a>
            </li>
        </ul>
    </div>
</div>
</body>
</html>
